﻿using System;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x02000207 RID: 519
public class MotiveController
{
	// Token: 0x06000AFF RID: 2815 RVA: 0x0005D130 File Offset: 0x0005B330
	public MotiveController(EntityBase agent)
	{
		this.motives = new List<IMotiveInstance>();
		this.agent = agent;
		if (BehaviorLists.Instance == null)
		{
			Debug.LogError("Behavior list has not been created.");
			return;
		}
		List<IMotive> list = BehaviorLists.Instance.GetMotives();
		foreach (IMotive motive in list)
		{
			this.motives.Add(motive.CreateInstance(this.agent));
		}
		this.Start();
	}

	// Token: 0x06000B00 RID: 2816 RVA: 0x0005D1D8 File Offset: 0x0005B3D8
	private void Start()
	{
		foreach (IMotiveInstance motiveInstance in this.motives)
		{
			motiveInstance.Start();
		}
	}

	// Token: 0x04001016 RID: 4118
	private List<IMotiveInstance> motives;

	// Token: 0x04001017 RID: 4119
	private EntityBase agent;
}
